// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.

using System;
using System.Collections.Generic;

namespace SixLabors.ImageSharp.Tests
{
    internal static class ReferencePalette
    {
        /// <summary>
        /// Gets a collection of named, web safe, colors as defined in the CSS Color Module Level 4.
        /// </summary>
        public static readonly Color[] WebSafeColors =
        {
            Color.AliceBlue,
            Color.AntiqueWhite,
            Color.Aqua,
            Color.Aquamarine,
            Color.Azure,
            Color.Beige,
            Color.Bisque,
            Color.Black,
            Color.BlanchedAlmond,
            Color.Blue,
            Color.BlueViolet,
            Color.Brown,
            Color.BurlyWood,
            Color.CadetBlue,
            Color.Chartreuse,
            Color.Chocolate,
            Color.Coral,
            Color.CornflowerBlue,
            Color.Cornsilk,
            Color.Crimson,
            Color.Cyan,
            Color.DarkBlue,
            Color.DarkCyan,
            Color.DarkGoldenrod,
            Color.DarkGray,
            Color.DarkGreen,
            Color.DarkKhaki,
            Color.DarkMagenta,
            Color.DarkOliveGreen,
            Color.DarkOrange,
            Color.DarkOrchid,
            Color.DarkRed,
            Color.DarkSalmon,
            Color.DarkSeaGreen,
            Color.DarkSlateBlue,
            Color.DarkSlateGray,
            Color.DarkTurquoise,
            Color.DarkViolet,
            Color.DeepPink,
            Color.DeepSkyBlue,
            Color.DimGray,
            Color.DodgerBlue,
            Color.Firebrick,
            Color.FloralWhite,
            Color.ForestGreen,
            Color.Fuchsia,
            Color.Gainsboro,
            Color.GhostWhite,
            Color.Gold,
            Color.Goldenrod,
            Color.Gray,
            Color.Green,
            Color.GreenYellow,
            Color.Honeydew,
            Color.HotPink,
            Color.IndianRed,
            Color.Indigo,
            Color.Ivory,
            Color.Khaki,
            Color.Lavender,
            Color.LavenderBlush,
            Color.LawnGreen,
            Color.LemonChiffon,
            Color.LightBlue,
            Color.LightCoral,
            Color.LightCyan,
            Color.LightGoldenrodYellow,
            Color.LightGray,
            Color.LightGreen,
            Color.LightPink,
            Color.LightSalmon,
            Color.LightSeaGreen,
            Color.LightSkyBlue,
            Color.LightSlateGray,
            Color.LightSteelBlue,
            Color.LightYellow,
            Color.Lime,
            Color.LimeGreen,
            Color.Linen,
            Color.Magenta,
            Color.Maroon,
            Color.MediumAquamarine,
            Color.MediumBlue,
            Color.MediumOrchid,
            Color.MediumPurple,
            Color.MediumSeaGreen,
            Color.MediumSlateBlue,
            Color.MediumSpringGreen,
            Color.MediumTurquoise,
            Color.MediumVioletRed,
            Color.MidnightBlue,
            Color.MintCream,
            Color.MistyRose,
            Color.Moccasin,
            Color.NavajoWhite,
            Color.Navy,
            Color.OldLace,
            Color.Olive,
            Color.OliveDrab,
            Color.Orange,
            Color.OrangeRed,
            Color.Orchid,
            Color.PaleGoldenrod,
            Color.PaleGreen,
            Color.PaleTurquoise,
            Color.PaleVioletRed,
            Color.PapayaWhip,
            Color.PeachPuff,
            Color.Peru,
            Color.Pink,
            Color.Plum,
            Color.PowderBlue,
            Color.Purple,
            Color.RebeccaPurple,
            Color.Red,
            Color.RosyBrown,
            Color.RoyalBlue,
            Color.SaddleBrown,
            Color.Salmon,
            Color.SandyBrown,
            Color.SeaGreen,
            Color.SeaShell,
            Color.Sienna,
            Color.Silver,
            Color.SkyBlue,
            Color.SlateBlue,
            Color.SlateGray,
            Color.Snow,
            Color.SpringGreen,
            Color.SteelBlue,
            Color.Tan,
            Color.Teal,
            Color.Thistle,
            Color.Tomato,
            Color.Transparent,
            Color.Turquoise,
            Color.Violet,
            Color.Wheat,
            Color.White,
            Color.WhiteSmoke,
            Color.Yellow,
            Color.YellowGreen
        };

        /// <summary>
        /// Gets a collection of colors as defined in the original second edition of Werner’s Nomenclature of Colours 1821.
        /// The hex codes were collected and defined by Nicholas Rougeux <see href="https://www.c82.net/werner"/>
        /// </summary>
        public static readonly Color[] WernerColors =
        {
            Color.ParseHex("#f1e9cd"),
            Color.ParseHex("#f2e7cf"),
            Color.ParseHex("#ece6d0"),
            Color.ParseHex("#f2eacc"),
            Color.ParseHex("#f3e9ca"),
            Color.ParseHex("#f2ebcd"),
            Color.ParseHex("#e6e1c9"),
            Color.ParseHex("#e2ddc6"),
            Color.ParseHex("#cbc8b7"),
            Color.ParseHex("#bfbbb0"),
            Color.ParseHex("#bebeb3"),
            Color.ParseHex("#b7b5ac"),
            Color.ParseHex("#bab191"),
            Color.ParseHex("#9c9d9a"),
            Color.ParseHex("#8a8d84"),
            Color.ParseHex("#5b5c61"),
            Color.ParseHex("#555152"),
            Color.ParseHex("#413f44"),
            Color.ParseHex("#454445"),
            Color.ParseHex("#423937"),
            Color.ParseHex("#433635"),
            Color.ParseHex("#252024"),
            Color.ParseHex("#241f20"),
            Color.ParseHex("#281f3f"),
            Color.ParseHex("#1c1949"),
            Color.ParseHex("#4f638d"),
            Color.ParseHex("#383867"),
            Color.ParseHex("#5c6b8f"),
            Color.ParseHex("#657abb"),
            Color.ParseHex("#6f88af"),
            Color.ParseHex("#7994b5"),
            Color.ParseHex("#6fb5a8"),
            Color.ParseHex("#719ba2"),
            Color.ParseHex("#8aa1a6"),
            Color.ParseHex("#d0d5d3"),
            Color.ParseHex("#8590ae"),
            Color.ParseHex("#3a2f52"),
            Color.ParseHex("#39334a"),
            Color.ParseHex("#6c6d94"),
            Color.ParseHex("#584c77"),
            Color.ParseHex("#533552"),
            Color.ParseHex("#463759"),
            Color.ParseHex("#bfbac0"),
            Color.ParseHex("#77747f"),
            Color.ParseHex("#4a475c"),
            Color.ParseHex("#b8bfaf"),
            Color.ParseHex("#b2b599"),
            Color.ParseHex("#979c84"),
            Color.ParseHex("#5d6161"),
            Color.ParseHex("#61ac86"),
            Color.ParseHex("#a4b6a7"),
            Color.ParseHex("#adba98"),
            Color.ParseHex("#93b778"),
            Color.ParseHex("#7d8c55"),
            Color.ParseHex("#33431e"),
            Color.ParseHex("#7c8635"),
            Color.ParseHex("#8e9849"),
            Color.ParseHex("#c2c190"),
            Color.ParseHex("#67765b"),
            Color.ParseHex("#ab924b"),
            Color.ParseHex("#c8c76f"),
            Color.ParseHex("#ccc050"),
            Color.ParseHex("#ebdd99"),
            Color.ParseHex("#ab9649"),
            Color.ParseHex("#dbc364"),
            Color.ParseHex("#e6d058"),
            Color.ParseHex("#ead665"),
            Color.ParseHex("#d09b2c"),
            Color.ParseHex("#a36629"),
            Color.ParseHex("#a77d35"),
            Color.ParseHex("#f0d696"),
            Color.ParseHex("#d7c485"),
            Color.ParseHex("#f1d28c"),
            Color.ParseHex("#efcc83"),
            Color.ParseHex("#f3daa7"),
            Color.ParseHex("#dfa837"),
            Color.ParseHex("#ebbc71"),
            Color.ParseHex("#d17c3f"),
            Color.ParseHex("#92462f"),
            Color.ParseHex("#be7249"),
            Color.ParseHex("#bb603c"),
            Color.ParseHex("#c76b4a"),
            Color.ParseHex("#a75536"),
            Color.ParseHex("#b63e36"),
            Color.ParseHex("#b5493a"),
            Color.ParseHex("#cd6d57"),
            Color.ParseHex("#711518"),
            Color.ParseHex("#e9c49d"),
            Color.ParseHex("#eedac3"),
            Color.ParseHex("#eecfbf"),
            Color.ParseHex("#ce536b"),
            Color.ParseHex("#b74a70"),
            Color.ParseHex("#b7757c"),
            Color.ParseHex("#612741"),
            Color.ParseHex("#7a4848"),
            Color.ParseHex("#3f3033"),
            Color.ParseHex("#8d746f"),
            Color.ParseHex("#4d3635"),
            Color.ParseHex("#6e3b31"),
            Color.ParseHex("#864735"),
            Color.ParseHex("#553d3a"),
            Color.ParseHex("#613936"),
            Color.ParseHex("#7a4b3a"),
            Color.ParseHex("#946943"),
            Color.ParseHex("#c39e6d"),
            Color.ParseHex("#513e32"),
            Color.ParseHex("#8b7859"),
            Color.ParseHex("#9b856b"),
            Color.ParseHex("#766051"),
            Color.ParseHex("#453b32")
        };

        public static readonly Dictionary<string, Color> ColorNames =
            new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase)
            {
                { nameof(Color.AliceBlue), Color.AliceBlue },
                { nameof(Color.AntiqueWhite), Color.AntiqueWhite },
                { nameof(Color.Aqua), Color.Aqua },
                { nameof(Color.Aquamarine), Color.Aquamarine },
                { nameof(Color.Azure), Color.Azure },
                { nameof(Color.Beige), Color.Beige },
                { nameof(Color.Bisque), Color.Bisque },
                { nameof(Color.Black), Color.Black },
                { nameof(Color.BlanchedAlmond), Color.BlanchedAlmond },
                { nameof(Color.Blue), Color.Blue },
                { nameof(Color.BlueViolet), Color.BlueViolet },
                { nameof(Color.Brown), Color.Brown },
                { nameof(Color.BurlyWood), Color.BurlyWood },
                { nameof(Color.CadetBlue), Color.CadetBlue },
                { nameof(Color.Chartreuse), Color.Chartreuse },
                { nameof(Color.Chocolate), Color.Chocolate },
                { nameof(Color.Coral), Color.Coral },
                { nameof(Color.CornflowerBlue), Color.CornflowerBlue },
                { nameof(Color.Cornsilk), Color.Cornsilk },
                { nameof(Color.Crimson), Color.Crimson },
                { nameof(Color.Cyan), Color.Cyan },
                { nameof(Color.DarkBlue), Color.DarkBlue },
                { nameof(Color.DarkCyan), Color.DarkCyan },
                { nameof(Color.DarkGoldenrod), Color.DarkGoldenrod },
                { nameof(Color.DarkGray), Color.DarkGray },
                { nameof(Color.DarkGreen), Color.DarkGreen },
                { nameof(Color.DarkGrey), Color.DarkGrey },
                { nameof(Color.DarkKhaki), Color.DarkKhaki },
                { nameof(Color.DarkMagenta), Color.DarkMagenta },
                { nameof(Color.DarkOliveGreen), Color.DarkOliveGreen },
                { nameof(Color.DarkOrange), Color.DarkOrange },
                { nameof(Color.DarkOrchid), Color.DarkOrchid },
                { nameof(Color.DarkRed), Color.DarkRed },
                { nameof(Color.DarkSalmon), Color.DarkSalmon },
                { nameof(Color.DarkSeaGreen), Color.DarkSeaGreen },
                { nameof(Color.DarkSlateBlue), Color.DarkSlateBlue },
                { nameof(Color.DarkSlateGray), Color.DarkSlateGray },
                { nameof(Color.DarkSlateGrey), Color.DarkSlateGrey },
                { nameof(Color.DarkTurquoise), Color.DarkTurquoise },
                { nameof(Color.DarkViolet), Color.DarkViolet },
                { nameof(Color.DeepPink), Color.DeepPink },
                { nameof(Color.DeepSkyBlue), Color.DeepSkyBlue },
                { nameof(Color.DimGray), Color.DimGray },
                { nameof(Color.DimGrey), Color.DimGrey },
                { nameof(Color.DodgerBlue), Color.DodgerBlue },
                { nameof(Color.Firebrick), Color.Firebrick },
                { nameof(Color.FloralWhite), Color.FloralWhite },
                { nameof(Color.ForestGreen), Color.ForestGreen },
                { nameof(Color.Fuchsia), Color.Fuchsia },
                { nameof(Color.Gainsboro), Color.Gainsboro },
                { nameof(Color.GhostWhite), Color.GhostWhite },
                { nameof(Color.Gold), Color.Gold },
                { nameof(Color.Goldenrod), Color.Goldenrod },
                { nameof(Color.Gray), Color.Gray },
                { nameof(Color.Green), Color.Green },
                { nameof(Color.GreenYellow), Color.GreenYellow },
                { nameof(Color.Grey), Color.Grey },
                { nameof(Color.Honeydew), Color.Honeydew },
                { nameof(Color.HotPink), Color.HotPink },
                { nameof(Color.IndianRed), Color.IndianRed },
                { nameof(Color.Indigo), Color.Indigo },
                { nameof(Color.Ivory), Color.Ivory },
                { nameof(Color.Khaki), Color.Khaki },
                { nameof(Color.Lavender), Color.Lavender },
                { nameof(Color.LavenderBlush), Color.LavenderBlush },
                { nameof(Color.LawnGreen), Color.LawnGreen },
                { nameof(Color.LemonChiffon), Color.LemonChiffon },
                { nameof(Color.LightBlue), Color.LightBlue },
                { nameof(Color.LightCoral), Color.LightCoral },
                { nameof(Color.LightCyan), Color.LightCyan },
                { nameof(Color.LightGoldenrodYellow), Color.LightGoldenrodYellow },
                { nameof(Color.LightGray), Color.LightGray },
                { nameof(Color.LightGreen), Color.LightGreen },
                { nameof(Color.LightGrey), Color.LightGrey },
                { nameof(Color.LightPink), Color.LightPink },
                { nameof(Color.LightSalmon), Color.LightSalmon },
                { nameof(Color.LightSeaGreen), Color.LightSeaGreen },
                { nameof(Color.LightSkyBlue), Color.LightSkyBlue },
                { nameof(Color.LightSlateGray), Color.LightSlateGray },
                { nameof(Color.LightSlateGrey), Color.LightSlateGrey },
                { nameof(Color.LightSteelBlue), Color.LightSteelBlue },
                { nameof(Color.LightYellow), Color.LightYellow },
                { nameof(Color.Lime), Color.Lime },
                { nameof(Color.LimeGreen), Color.LimeGreen },
                { nameof(Color.Linen), Color.Linen },
                { nameof(Color.Magenta), Color.Magenta },
                { nameof(Color.Maroon), Color.Maroon },
                { nameof(Color.MediumAquamarine), Color.MediumAquamarine },
                { nameof(Color.MediumBlue), Color.MediumBlue },
                { nameof(Color.MediumOrchid), Color.MediumOrchid },
                { nameof(Color.MediumPurple), Color.MediumPurple },
                { nameof(Color.MediumSeaGreen), Color.MediumSeaGreen },
                { nameof(Color.MediumSlateBlue), Color.MediumSlateBlue },
                { nameof(Color.MediumSpringGreen), Color.MediumSpringGreen },
                { nameof(Color.MediumTurquoise), Color.MediumTurquoise },
                { nameof(Color.MediumVioletRed), Color.MediumVioletRed },
                { nameof(Color.MidnightBlue), Color.MidnightBlue },
                { nameof(Color.MintCream), Color.MintCream },
                { nameof(Color.MistyRose), Color.MistyRose },
                { nameof(Color.Moccasin), Color.Moccasin },
                { nameof(Color.NavajoWhite), Color.NavajoWhite },
                { nameof(Color.Navy), Color.Navy },
                { nameof(Color.OldLace), Color.OldLace },
                { nameof(Color.Olive), Color.Olive },
                { nameof(Color.OliveDrab), Color.OliveDrab },
                { nameof(Color.Orange), Color.Orange },
                { nameof(Color.OrangeRed), Color.OrangeRed },
                { nameof(Color.Orchid), Color.Orchid },
                { nameof(Color.PaleGoldenrod), Color.PaleGoldenrod },
                { nameof(Color.PaleGreen), Color.PaleGreen },
                { nameof(Color.PaleTurquoise), Color.PaleTurquoise },
                { nameof(Color.PaleVioletRed), Color.PaleVioletRed },
                { nameof(Color.PapayaWhip), Color.PapayaWhip },
                { nameof(Color.PeachPuff), Color.PeachPuff },
                { nameof(Color.Peru), Color.Peru },
                { nameof(Color.Pink), Color.Pink },
                { nameof(Color.Plum), Color.Plum },
                { nameof(Color.PowderBlue), Color.PowderBlue },
                { nameof(Color.Purple), Color.Purple },
                { nameof(Color.RebeccaPurple), Color.RebeccaPurple },
                { nameof(Color.Red), Color.Red },
                { nameof(Color.RosyBrown), Color.RosyBrown },
                { nameof(Color.RoyalBlue), Color.RoyalBlue },
                { nameof(Color.SaddleBrown), Color.SaddleBrown },
                { nameof(Color.Salmon), Color.Salmon },
                { nameof(Color.SandyBrown), Color.SandyBrown },
                { nameof(Color.SeaGreen), Color.SeaGreen },
                { nameof(Color.SeaShell), Color.SeaShell },
                { nameof(Color.Sienna), Color.Sienna },
                { nameof(Color.Silver), Color.Silver },
                { nameof(Color.SkyBlue), Color.SkyBlue },
                { nameof(Color.SlateBlue), Color.SlateBlue },
                { nameof(Color.SlateGray), Color.SlateGray },
                { nameof(Color.SlateGrey), Color.SlateGrey },
                { nameof(Color.Snow), Color.Snow },
                { nameof(Color.SpringGreen), Color.SpringGreen },
                { nameof(Color.SteelBlue), Color.SteelBlue },
                { nameof(Color.Tan), Color.Tan },
                { nameof(Color.Teal), Color.Teal },
                { nameof(Color.Thistle), Color.Thistle },
                { nameof(Color.Tomato), Color.Tomato },
                { nameof(Color.Transparent), Color.Transparent },
                { nameof(Color.Turquoise), Color.Turquoise },
                { nameof(Color.Violet), Color.Violet },
                { nameof(Color.Wheat), Color.Wheat },
                { nameof(Color.White), Color.White },
                { nameof(Color.WhiteSmoke), Color.WhiteSmoke },
                { nameof(Color.Yellow), Color.Yellow },
                { nameof(Color.YellowGreen), Color.YellowGreen }
            };
    }
}
